'use strict';
/**
 * Config for the router
 */
angular.module('app')
  .run(
    [          '$rootScope', '$state', '$stateParams',
      function ($rootScope,   $state,   $stateParams) {
          $rootScope.$state = $state;
          $rootScope.$stateParams = $stateParams;        
      }
    ]
  )
  .config(
    [          '$stateProvider', '$urlRouterProvider',
      function ($stateProvider,   $urlRouterProvider) {
          
          $urlRouterProvider.otherwise('/app/dashboard-v1');
          $stateProvider.state('app', {
                  abstract: true,
                  url: '/app',
                  templateUrl: 'tpl/app.html',
//登录验证
    controllerProvider : function($rootScope){

      console.log('router.js-loginflag:'+$rootScope.$state.isLogin);

          if($rootScope.$state.isLogin == false){
                    $rootScope.$state.go('login.signin');
                }
                    
            }



              })
              .state('app.dashboard-v1', {
                  url: '/dashboard-v1',
                  templateUrl: 'tpl/app_dashboard_v1.html',
                  resolve: {
                    deps: ['$ocLazyLoad',
                      function( $ocLazyLoad ){
                        return $ocLazyLoad.load(['js/controllers/chart.js']);
                    }]
                  }
              })
              .state('app.dashboard-v2', {
                  url: '/dashboard-v2',
                  templateUrl: 'tpl/app_dashboard_v2.html',
                  resolve: {
                    deps: ['$ocLazyLoad',
                      function( $ocLazyLoad ){
                        return $ocLazyLoad.load(['js/controllers/chart.js']);
                    }]
                  }
              })

              .state('app.ui', {
                  url: '/ui',
                  template: '<div ui-view class="fade-in-up"></div>'
              })
              .state('app.ui.buttons', {
                  url: '/buttons',
                  templateUrl: 'tpl/ui_buttons.html'
              })
              .state('app.ui.icons', {
                  url: '/icons',
                  templateUrl: 'tpl/ui_icons.html'
              })
              .state('app.ui.grid', {
                  url: '/grid',
                  templateUrl: 'tpl/ui_grid.html'
              })
              .state('app.ui.widgets', {
                  url: '/widgets',
                  templateUrl: 'tpl/ui_widgets.html'
              })          
              .state('app.ui.bootstrap', {
                  url: '/bootstrap',
                  templateUrl: 'tpl/ui_bootstrap.html'
              })
              .state('app.ui.sortable', {
                  url: '/sortable',
                  templateUrl: 'tpl/ui_sortable.html'
              })
              .state('app.ui.portlet', {
                  url: '/portlet',
                  templateUrl: 'tpl/ui_portlet.html'
              })
              .state('app.ui.timeline', {
                  url: '/timeline',
                  templateUrl: 'tpl/ui_timeline.html'
              })
              .state('app.ui.tree', {
                  url: '/tree',
                  templateUrl: 'tpl/ui_tree.html',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('angularBootstrapNavTree').then(
                              function(){
                                 return $ocLazyLoad.load('js/controllers/tree.js');
                              }
                          );
                        }
                      ]
                  }
              })
              .state('app.ui.toaster', {
                  url: '/toaster',
                  templateUrl: 'tpl/ui_toaster.html',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad){
                          return $ocLazyLoad.load('toaster').then(
                              function(){
                                 return $ocLazyLoad.load('js/controllers/toaster.js');
                              }
                          );
                      }]
                  }
              })
              .state('app.ui.jvectormap', {
                  url: '/jvectormap',
                  templateUrl: 'tpl/ui_jvectormap.html',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad){
                          return $ocLazyLoad.load('js/controllers/vectormap.js');
                      }]
                  }
              })
              .state('app.ui.googlemap', {
                  url: '/googlemap',
                  templateUrl: 'tpl/ui_googlemap.html',
                  resolve: {
                      deps: ['uiLoad',
                        function( uiLoad ){
                          return uiLoad.load( [
                            'js/app/map/load-google-maps.js',
                            'js/app/map/ui-map.js',
                            'js/app/map/map.js'] ).then(
                              function(){
                                return loadGoogleMaps(); 
                              }
                            );
                      }]
                  }
              })
              .state('app.chart', {
                  url: '/chart',
                  templateUrl: 'tpl/ui_chart.html',
                  resolve: {
                      deps: ['uiLoad',
                        function( uiLoad){
                          return uiLoad.load('js/controllers/chart.js');
                      }]
                  }
              })
              // table
              .state('app.table', {
                  url: '/table',
                  template: '<div ui-view></div>'
              })
              .state('app.table.static', {
                  url: '/static',
                  templateUrl: 'tpl/table_static.html'
              })
              .state('app.table.datatable', {
                  url: '/datatable',
                  templateUrl: 'tpl/table_datatable.html'
              })
              .state('app.table.footable', {
                  url: '/footable',
                  templateUrl: 'tpl/table_footable.html'
              })
              .state('app.table.grid', {
                  url: '/grid',
                  templateUrl: 'tpl/table_grid.html',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('ngGrid').then(
                              function(){
                                  return $ocLazyLoad.load('js/controllers/grid.js');
                              }
                          );
                      }]
                  }
              })
              // form
              .state('app.form', {
                  url: '/form',
                  template: '<div ui-view class="fade-in"></div>',
                  resolve: {
                      deps: ['uiLoad',
                        function( uiLoad){
                          return uiLoad.load('js/controllers/form.js');
                      }]
                  }
              })
              .state('app.form.elements', {
                  url: '/elements',
                  templateUrl: 'tpl/form_elements.html'
              })
              .state('app.form.validation', {
                  url: '/validation',
                  templateUrl: 'tpl/form_validation.html'
              })
              .state('app.form.wizard', {
                  url: '/wizard',
                  templateUrl: 'tpl/form_wizard.html'
              })
              .state('app.form.fileupload', {
                  url: '/fileupload',
                  templateUrl: 'tpl/form_fileupload.html',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad){
                          return $ocLazyLoad.load('angularFileUpload').then(
                              function(){
                                 return $ocLazyLoad.load('js/controllers/file-upload.js');
                              }
                          );
                      }]
                  }
              })
             


              .state('app.form.imagecrop', {
                  url: '/imagecrop',
                  templateUrl: 'tpl/form_imagecrop.html',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad){
                          return $ocLazyLoad.load('ngImgCrop').then(
                              function(){
                                 return $ocLazyLoad.load('js/controllers/imgcrop.js');
                              }
                          );
                      }]
                  }
              })
              .state('app.form.select', {
                  url: '/select',
                  templateUrl: 'tpl/form_select.html',
                  controller: 'SelectCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('ui.select').then(
                              function(){
                                  return $ocLazyLoad.load('js/controllers/select.js');
                              }
                          );
                      }]
                  }
              })
              .state('app.form.slider', {
                  url: '/slider',
                  templateUrl: 'tpl/form_slider.html',
                  controller: 'SliderCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('vr.directives.slider').then(
                              function(){
                                  return $ocLazyLoad.load('js/controllers/slider.js');
                              }
                          );
                      }]
                  }
              })
              .state('app.form.editor', {
                  url: '/editor',
                  templateUrl: 'tpl/form_editor.html',
                  controller: 'EditorCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('textAngular').then(
                              function(){
                                  return $ocLazyLoad.load('js/controllers/editor.js');
                              }
                          );
                      }]
                  }
              })
              // pages
              .state('app.page', {
                  url: '/page',
                  template: '<div ui-view class="fade-in-down"></div>'
              })
              .state('app.page.profile', {
                  url: '/profile',
                  templateUrl: 'tpl/page_profile.html'
              })
              .state('app.page.post', {
                  url: '/post',
                  templateUrl: 'tpl/page_post.html'
              })
              .state('app.page.search', {
                  url: '/search',
                  templateUrl: 'tpl/page_search.html'
              })
              .state('app.page.invoice', {
                  url: '/invoice',
                  templateUrl: 'tpl/page_invoice.html'
              })
              .state('app.page.price', {
                  url: '/price',
                  templateUrl: 'tpl/page_price.html'
              })
              .state('app.docs', {
                  url: '/docs',
                  templateUrl: 'tpl/docs.html'
              })
              // others
              .state('lockme', {
                  url: '/lockme',
                  templateUrl: 'tpl/page_lockme.html'
              })
              .state('access', {
                  url: '/access',
                  template: '<div ui-view class="fade-in-right-big smooth"></div>'
              })
              .state('access.signin', {
                  url: '/signin',
                  templateUrl: 'tpl/page_signin.html',
                  resolve: {
                      deps: ['uiLoad',
                        function( uiLoad ){
                          return uiLoad.load( ['js/controllers/signin.js'] );
                      }]
                  }
              })
              .state('access.signup', {
                  url: '/signup',
                  templateUrl: 'tpl/page_signup.html',
                  resolve: {
                      deps: ['uiLoad',
                        function( uiLoad ){
                          return uiLoad.load( ['js/controllers/signup.js'] );
                      }]
                  }
              })
              .state('access.forgotpwd', {
                  url: '/forgotpwd',
                  templateUrl: 'tpl/page_forgotpwd.html'
              })
              .state('access.404', {
                  url: '/404',
                  templateUrl: 'tpl/page_404.html'
              })

              // fullCalendar
              .state('app.calendar', {
                  url: '/calendar',
                  templateUrl: 'tpl/app_calendar.html',
                  // use resolve to load other dependences
                  resolve: {
                      deps: ['$ocLazyLoad', 'uiLoad',
                        function( $ocLazyLoad, uiLoad ){
                          return uiLoad.load(
                            ['vendor/jquery/fullcalendar/fullcalendar.css',
                              'vendor/jquery/fullcalendar/theme.css',
                              'vendor/jquery/jquery-ui-1.10.3.custom.min.js',
                              'vendor/libs/moment.min.js',
                              'vendor/jquery/fullcalendar/fullcalendar.min.js',
                              'js/app/calendar/calendar.js']
                          ).then(
                            function(){
                              return $ocLazyLoad.load('ui.calendar');
                            }
                          )
                      }]
                  }
              })

              // mail
              .state('app.mail', {
                  abstract: true,
                  url: '/mail',
                  templateUrl: 'tpl/mail.html',
                  // use resolve to load other dependences
                  resolve: {
                      deps: ['uiLoad',
                        function( uiLoad ){
                          return uiLoad.load( ['js/app/mail/mail.js',
                                               'js/app/mail/mail-service.js',
                                               'vendor/libs/moment.min.js'] );
                      }]
                  }
              })
              .state('app.mail.list', {
                  url: '/inbox/{fold}',
                  templateUrl: 'tpl/mail.list.html'
              })
              .state('app.mail.detail', {
                  url: '/{mailId:[0-9]{1,4}}',
                  templateUrl: 'tpl/mail.detail.html'
              })
              .state('app.mail.compose', {
                  url: '/compose',
                  templateUrl: 'tpl/mail.new.html'
              })

              .state('layout', {
                  abstract: true,
                  url: '/layout',
                  templateUrl: 'tpl/layout.html'
              })
              .state('layout.fullwidth', {
                  url: '/fullwidth',
                  views: {
                      '': {
                          templateUrl: 'tpl/layout_fullwidth.html'
                      },
                      'footer': {
                          templateUrl: 'tpl/layout_footer_fullwidth.html'
                      }
                  },
                  resolve: {
                      deps: ['uiLoad',
                        function( uiLoad ){
                          return uiLoad.load( ['js/controllers/vectormap.js'] );
                      }]
                  }
              })
              .state('layout.mobile', {
                  url: '/mobile',
                  views: {
                      '': {
                          templateUrl: 'tpl/layout_mobile.html'
                      },
                      'footer': {
                          templateUrl: 'tpl/layout_footer_mobile.html'
                      }
                  }
              })
              .state('layout.app', {
                  url: '/app',
                  views: {
                      '': {
                          templateUrl: 'tpl/layout_app.html'
                      },
                      'footer': {
                          templateUrl: 'tpl/layout_footer_fullwidth.html'
                      }
                  },
                  resolve: {
                      deps: ['uiLoad',
                        function( uiLoad ){
                          return uiLoad.load( ['js/controllers/tab.js'] );
                      }]
                  }
              })
              .state('apps', {
                  abstract: true,
                  url: '/apps',
                  templateUrl: 'tpl/layout.html'
              })
              .state('apps.note', {
                  url: '/note',
                  templateUrl: 'tpl/apps_note.html',
                  resolve: {
                      deps: ['uiLoad',
                        function( uiLoad ){
                          return uiLoad.load( ['js/app/note/note.js',
                                               'vendor/libs/moment.min.js'] );
                      }]
                  }
              })
              .state('apps.contact', {
                  url: '/contact',
                  templateUrl: 'tpl/apps_contact.html',
                  resolve: {
                      deps: ['uiLoad',
                        function( uiLoad ){
                          return uiLoad.load( ['js/app/contact/contact.js'] );
                      }]
                  }
              })
              .state('app.weather', {
                  url: '/weather',
                  templateUrl: 'tpl/apps_weather.html',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load(
                              {
                                  name: 'angular-skycons',
                                  files: ['js/app/weather/skycons.js',
                                          'vendor/libs/moment.min.js', 
                                          'js/app/weather/angular-skycons.js',
                                          'js/app/weather/ctrl.js' ] 
                              }
                          );
                      }]
                  }
              })
              .state('music', {
                  url: '/music',
                  templateUrl: 'tpl/music.html',
                  controller: 'MusicCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load([
                            'com.2fdevs.videogular', 
                            'com.2fdevs.videogular.plugins.controls', 
                            'com.2fdevs.videogular.plugins.overlayplay',
                            'com.2fdevs.videogular.plugins.poster',
                            'com.2fdevs.videogular.plugins.buffering',
                            'js/app/music/ctrl.js', 
                            'js/app/music/theme.css'
                          ]);
                      }]
                  }
              })
                .state('music.home', {
                    url: '/home',
                    templateUrl: 'tpl/music.home.html'
                })
                .state('music.genres', {
                    url: '/genres',
                    templateUrl: 'tpl/music.genres.html'
                })
                .state('music.detail', {
                    url: '/detail',
                    templateUrl: 'tpl/music.detail.html'
                })
                .state('music.mtv', {
                    url: '/mtv',
                    templateUrl: 'tpl/music.mtv.html'
                })
                .state('music.mtvdetail', {
                    url: '/mtvdetail',
                    templateUrl: 'tpl/music.mtv.detail.html'
                })
                .state('music.playlist', {
                    url: '/playlist/{fold}',
                    templateUrl: 'tpl/music.playlist.html'
                })

                //自定义开发路由
               .state('login', {
                  url: '/login',
                  template: '<div ui-view class="fade-in-right-big smooth"></div>'
              })
              .state('login.signin', {
                  url: '/signin',
                  templateUrl: 'src/app/login/signin.html'
              })
                   // movie影视
              .state('app.movie', {
                  url: '/movie',
                  template: '<div ui-view></div>'
              })
              //节目管理
              .state('app.movie.program', {
                  url: '/program',
                  templateUrl: 'src/app/program/program_datatable.html'
              })
              .state('app.movie.programEdit', {
                    url: '/program/edit/:infoId',
                    templateUrl: 'src/app/program/program_edit.html',
                         controller: 'SelectCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('ui.select');
                      }]
                  }
                   
                })
                .state('app.movie.programAdd', {
                    url: '/program/add/:classId',
                    templateUrl: 'src/app/program/program_edit.html',
                         controller: 'SelectCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('ui.select');
                      }]
                  }
                   
                })
              .state('app.movie.diversity', {
                    url: '/program/diversity/:programId',
                    templateUrl: 'src/app/program/diversity_datatable.html'
                   
                })
                .state('app.movie.dEdit', {
                    url: '/program/dEdit/:deversityId/:programId',
                    templateUrl: 'src/app/program/diversity_edit.html'
                   
                }) 
                //栏目管理
              .state('app.movie.managerColumn', {
                  url: '/managerColumn',
                  templateUrl: 'src/app/managerColumn/column_datatable.html'
              }) 
              .state('app.movie.managerColumnEdit', {
                    url: '/managerColumn/edit/:infoId',
                    templateUrl: 'src/app/managerColumn/column_edit.html'    
                })
               .state('app.movie.managerColumnAdd', {
                    url: '/managerColumn/add/:classId',
                    templateUrl: 'src/app/managerColumn/column_edit.html'    
                })
              //海报管理
              .state('app.movie.programPoster', {
                  url: '/programPoster',
                  templateUrl: 'src/app/programPoster/poster_datatable.html'
              }) .state('app.movie.programPosterEdit', {
                    url: '/programPoster/edit/:infoId',
                    templateUrl: 'src/app/programPoster/poster_edit.html'    
                })
           


               //直播流管理
               .state('app.stream', {
                  url: '/stream',
                  template: '<div ui-view></div>'
              })
              .state('app.stream.stream', {
                  url: '/stream',
                  templateUrl: 'src/app/stream/stream_datatable.html'
              }) 
              .state('app.stream.streamEdit', {
                    url: '/stream/edit/:infoId',
                    templateUrl: 'src/app/stream/stream_edit.html',
                      controller: 'SelectCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('ui.select');
                      }]
                  }
                   
                })
                 .state('app.stream.streamStatus', {
                  url: '/streamStatus',
                  templateUrl: 'src/app/streamStatus/streamStatus_datatable.html'
              }) 
                //频道管理=======================================================
              .state('app.channel', {
                  url: '/channel',
                  template: '<div ui-view></div>'
              })
              .state('app.channel.channel', {
                  url: '/channel',
                  templateUrl: 'src/app/channel/channel_datatable.html'
              }) 
              .state('app.channel.channelEdit', {
                    url: '/channel/edit/:infoId',
                    templateUrl: 'src/app/channel/channel_edit.html',
                         controller: 'SelectCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('ui.select');
                      }]
                  }
                   
                })
               .state('app.channel.channelAdd', {
                    url: '/channel/add/:classId',
                    templateUrl: 'src/app/channel/channel_edit.html',
                    controller: 'SelectCtrl',
                    resolve: {
                        deps: ['$ocLazyLoad',
                          function( $ocLazyLoad ){
                            return $ocLazyLoad.load('ui.select');
                        }]
                    }
                   
                })

              //频道状态监控
              .state('app.channel.channelStatus', {
                  url: '/channelStatus',
                  templateUrl: 'src/app/channel/channelStatus/channelStatus_datatable.html'
              })

              //EPG管理
              .state('app.epgManager', {
                url: '/epgManager',
                template: '<div ui-view></div>'
              })
              .state('app.epgManager.epgManager', {
                  url: '/epgManager/:cId',
                  templateUrl: 'src/app/channel/epgManager/epgManager_datatable.html'
              }) .state('app.epgManager.epgManagerEdit', {
                    url: '/epgManager/edit/:cId/:epgId',
                    templateUrl: 'src/app/channel/epgManager/epgManager_edit.html'
                   
              })
              //录制任务管理
              .state('app.channel.recordingTask',{
                url:'/recordingTask/:channelId',
                templateUrl:'src/app/channel/recordingTask/recording_dataTable.html'
              })

              //新增定时任务
              .state('app.channel.timedTask', {
                  url: '/recordingTask/timedTask/:channelId',
                  templateUrl: 'src/app/channel/recordingTask/timedTask.html',
                 
              })

              //信号源管理================
               .state('app.signal', {
                  url: '/signal',
                  template: '<div ui-view></div>'
              })
              .state('app.signal.signal', {
                  url: '/signal',
                  templateUrl: 'src/app/signal/signal_datatable.html'
              }) .state('app.signal.signalEdit', {
                    url: '/signal/edit/:infoId',
                    templateUrl: 'src/app/signal/signal_edit.html',
                         controller: 'SelectCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('ui.select');
                      }]
                  }
                   
                })

                //菜单管理
               .state('app.menuInfo', {
                  url: '/menuInfo',
                  template: '<div ui-view></div>'
              })
              .state('app.menuInfo.menuInfo', {
                  url: '/menuInfo',
                  templateUrl: 'src/app/menuInfo/menuInfo_dataGrid.html'
              }) 

              .state('app.menuInfo.menuInfoEdit', {
                  url: '/menuInfo/edit/:infoId',
                  templateUrl: 'src/app/menuInfo/menuInfo_edit.html'
              }) 

              //转码方案
              .state('app.transcoding', {
                  url: '/transcoding',
                  template: '<div ui-view></div>'
              })
              .state('app.transcoding.transcoding', {
                  url: '/transcoding',
                  templateUrl: 'src/app/transcoding/transcoding_dataTable.html'
              }) 

              .state('app.transcoding.transcodingEdit', {
                  url: '/transcoding/edit/:infoId',
                  templateUrl: 'src/app/transcoding/transcoding_edit.html'
              }) 

                 //文本文件管理
               .state('app.textFile', {
                  url: '/textFile',
                  template: '<div ui-view></div>'
              })
              .state('app.textFile.textFile', {
                  url: '/textFile',
                  templateUrl: 'src/app/textFile/textFile_datatable.html'
              }) 
                 //图片文件管理
               .state('app.imageFile', {
                  url: '/imageFile',
                  template: '<div ui-view></div>'
              })
              .state('app.imageFile.imageFile', {
                  url: '/imageFile',
                  templateUrl: 'src/app/imageFile/imageFile_datatable.html'
              }) 

             //视频文件管理
               .state('app.videoFile', {
                  url: '/videoFile',
                  template: '<div ui-view></div>'
              })
              //视频文件
              .state('app.videoFile.videoFile', {
                  url: '/videoFile',
                  templateUrl: 'src/app/videoFile/videoFile_datatable.html'
              }) 
              

             //用户管理
               .state('app.user', {
                  url: '/user',
                  template: '<div ui-view></div>'
              })
              .state('app.user.user', {
                  url: '/user',
                  templateUrl: 'src/app/user/user_datatable.html'
              }) 
              .state('app.user.userEdit', {
                    url: '/user/edit/:infoId',
                    templateUrl: 'src/app/user/user_edit.html',
                  controller: 'SelectCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('ui.select');
                      }]
                  }
                   
                })
               .state('app.user.userAdd', {
                    url: '/user/add/:classId',
                    templateUrl: 'src/app/user/user_edit.html',
                         controller: 'SelectCtrl',
                  resolve: {
                      deps: ['$ocLazyLoad',
                        function( $ocLazyLoad ){
                          return $ocLazyLoad.load('ui.select');
                      }]
                  }
                   
                })
              .state('app.user.operationPrivilege', {
                    url: '/user/operationPrivilege/:type/:infoId',
                    templateUrl: 'src/app/user/contains_operationPrivilege.html'
                   
                })
              //部门管理
              .state('app.user.department', {
                  url: '/department',
                  templateUrl: 'src/app/user/department_datatable.html',
                
                    resolve: {
                        deps: ['$ocLazyLoad',
                          function( $ocLazyLoad ){
                            return $ocLazyLoad.load('angularBootstrapNavTree');
                        }]
                    }
              }) 
              .state('app.user.departmentEdit', {
                    url: '/department/edit/:infoId',
                    templateUrl: 'src/app/user/department_edit.html'
                  
                   
                })


                //转码任务=-=-=-==-=-=-=-
               .state('app.taskTranscode', {
                  url: '/taskTranscode',
                  template: '<div ui-view></div>'
              })
              .state('app.taskTranscode.taskTranscode', {
                  url: '/taskTranscode',
                  templateUrl: 'src/app/taskTranscode/taskTranscode_datatable.html'
              }) 

               //上传任务
               .state('app.taskUpload', {
                  url: '/taskUpload',
                  template: '<div ui-view></div>'
              })
              .state('app.taskUpload.taskUpload', {
                  url: '/taskUpload',
                  templateUrl: 'src/app/taskUpload/taskUpload_datatable.html'
              }) 

           

               //测试播放调试
                .state('app.tPlay', {
                url: '/tPlay',
                template: '<div ui-view></div>'
              })
               .state('app.tPlay.tPlay', {
                  url: '/tPlay',
                  templateUrl: 'src/app/play/Demo.html'
              })

            //=============================================
            .state('app.upload',{
              url:'/upload',
              template:'<div ui-view></div>'
            })
            .state('app.upload.upload',{
              url:'/upload',
              templateUrl:'src/app/upload/upload_dataTable.html'
            })
           .state('app.upload.fileUpload',{
            url:'/fileUpload',
            templateUrl:'src/app/upload/jsuploader.html',

            })

      }
    ]
  );